﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Xml.Serialization;

namespace Sovigaz.DataProvider
{
    public partial class SovigazDbContext
    {
        public DbSet<Test> Tests { get; set; }
    }

    [Table("Tests")]
    public class Test : AuditableEntity
    {
        public Test()
        {
            TestedDate = DateTime.Now;
            Result = TestResult.D.ToString();
            IsActived = true;
        }

        [Key]
        public int TestID { get; set; }

        public int ProductID { get; set; }

        public string TestCode { get; set; }

        public DateTime TestedDate { get; set; }

        public string Enterprise { get; set; }

        public string TestMachine { get; set; }

        public Decimal TestWeight { get; set; }

        public Decimal LostWeight { get; set; }

        public Decimal TestVolume { get; set; }

        public string Result { get; set; }

        public string Description { get; set; }
    }

    public class TestComplex
    {
        public int TestID { get; set; }

        public int ProductID { get; set; }

        public int OwnerID { get; set; }

        public string Barcode { get; set; }

        public string ProductCode { get; set; }

        public string TestCode { get; set; }

        public DateTime TestedDate { get; set; }

        public string Enterprise { get; set; }

        public string TestMachine { get; set; }

        public Decimal TestWeight { get; set; }

        public Decimal LostWeight { get; set; }

        public Decimal TestVolume { get; set; }

        public string Result { get; set; }

        public string Description { get; set; }

        public bool IsDeleted { get; set; }
    }
    public enum TestResult
    {
        D,
        K
    }
}